package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.query.SignflowsExecuteUrlParamQuery;
import net.yondervision.hrfsp.sdk.esign.domain.request.path.SignflowsExecuteUrlParamPath;
import net.yondervision.hrfsp.sdk.esign.domain.response.SignflowsExecuteUrlResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/09/28 14:30
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SignflowsExecuteUrlRequest extends AbstractESignRequest implements
    ESignRequest<SignflowsExecuteUrlResponse> {

  private SignflowsExecuteUrlParamPath signflowsExecuteUrlParamPath;
  private SignflowsExecuteUrlParamQuery signflowsExecuteUrlParamQuery;

  public SignflowsExecuteUrlRequest(
      SignflowsExecuteUrlParamPath signflowsExecuteUrlParamPath,
      SignflowsExecuteUrlParamQuery signflowsExecuteUrlParamQuery) {
    this.signflowsExecuteUrlParamPath = signflowsExecuteUrlParamPath;
    this.signflowsExecuteUrlParamQuery = signflowsExecuteUrlParamQuery;
    this.setParamPath(signflowsExecuteUrlParamPath);
    this.setParamQuery(signflowsExecuteUrlParamQuery);
  }

  @Override
  public String getUrl() {
    return "/signflows/{flowId}/executeUrl";
  }

  @Override
  public Method getMethodType() {
    return Method.GET;
  }

  @Override
  public Class<SignflowsExecuteUrlResponse> getResponseClass() {
    return SignflowsExecuteUrlResponse.class;
  }

}
